{% extends "manabe/template.html" %}
{% load static %}
{% block title %}
更改密码
{% endblock %}
{% block content %}
{% if not changepwd_success %}
    <form action="" method="post" class="form form-horizontal">
    {% csrf_token %}
    <div class="row cl">
        <div class="formControls col-xs-8">
            {{ form.oldpassword }}
        </div>
    </div>

    <div class="row cl">
        <div class="formControls col-xs-8">
             {{ form.newpassword1 }}
        </div>
    </div>
    <div class="row cl">
        <div class="formControls col-xs-8">
             {{ form.newpassword2 }}
        </div>
    </div>
    <div class="row cl text-l">
        {% for item in error %}
            <p style="color: red;" class="text-l">{{ item }}</p>
        {% endfor %}
        <div class="formControls">
            <input type="submit" class="btn btn-success radius size-L" value="更改密码">
        </div>
    </div>
    </form>
{% else %}
    <div>密码更改成功，请用<a href="{% url 'logout' %}">重新登录</a>！</div>
{% endif %}
{% endblock %}